package com.bz.sso.service;

import com.bz.pojo.TbUser;
import com.bz.utils.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface SSOService {

    /**
     * 对用户的注册信息(用户名与电话号码)做数据校验
     * @param checkValue
     * @param checkFlag
     * @return
     */
    Result checkUserInfo(String checkValue, Integer checkFlag);

    /**
     * 用户注册
     * @param tbUser
     * @return
     */
    Result userRegister(TbUser tbUser);

    /**
     * 用户登录
     * @param username
     * @param password
     * @param request
     * @param response
     * @return
     */
    Result userLogin(String username, String password, HttpServletRequest request, HttpServletResponse response);

    /**
     * 用户退出登录
     * @param token
     * @return
     */
    Result logOut(String token);
}
